<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="urn:hl7-org:v3 ..\sdschemas\SDA.xsd">
    <#assign templateData={"title":"高血压患者随访服务", "code":"HSDB04.01", "templateId":"2.16.156.10011.2.1.1.12"}>
    <#include "fragment/header/header.ftl">

    <component>
        <structuredBody>
            <component>
                <section>
                    <code displayName="随访事件"/>
                    <entry>
                        <observation moodCode="EVN" classCode="CASE">
                            <code code="DE06.00.108.00" codeSystem="2.16.156.10011.2.2.1" displayName="随访方式"
                                  codeSystemName="卫生信息数据元目录"/>
                            <effectiveTime value="${docData.suiFangSJ.benCiSFSJ}"/>
                            <value code="${docData.suiFangSJ.suiFangFS.code}" xsi:type="CD"
                                   codeSystem="2.16.156.10011.2.3.1.183"
                                   displayName="${docData.suiFangSJ.suiFangFS.displayName}"
                                   codeSystemName="随访方式代码表"/>
                        </observation>
                    </entry>
                </section>
            </component>
            <component>
                <section>
                    <code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"
                          displayName=" PROBLEM LIST "/>
                    <text/>
                    <#list docData.zhengZhuang as item>
                        <entry>
                            <organizer moodCode="EVN" classCode="BATTERY">
                                <statusCode/>
                                <component>
                                    <observation moodCode="EVN" classCode="OBS">
                                        <code code="DE04.01.116.00" codeSystem="2.16.156.10011.2.2.1"
                                              displayName="症状代码"
                                              codeSystemName="卫生信息数据元目录"/>
                                        <value code="${item.zhengZhuangDM.code}" xsi:type="CD"
                                               codeSystem="2.16.156.10011.2.3.3.11"
                                               displayName="${item.zhengZhuangDM.displayName}"
                                               codeSystemName="ICD-10"/>
                                    </observation>
                                </component>
                                <component>
                                    <observation moodCode="EVN" classCode="OBS">
                                        <code code="DE04.01.118.00" codeSystem="2.16.156.10011.2.2.1" displayName="症状名称"
                                              codeSystemName="卫生信息数据元目录"/>
                                        <value xsi:type="ST">${item.zhengZhuangMC}</value>
                                    </observation>
                                </component>
                            </organizer>
                        </entry>
                    </#list>
                </section>
            </component>
            <component>
                <section>
                    <code code="8716-3" codeSystem="2.16.840.1.113883.6.1" displayName="VITAL SIGNS"
                          codeSystemName="LOINC"/>
                    <text/>
                    <entry>
                        <organizer moodCode="EVN" classCode="BATTERY">
                            <statusCode/>
                            <component>
                                <observation moodCode="EVN" classCode="OBS">
                                    <code code="DE04.10.174.00" codeSystem="2.16.156.10011.2.2.1" displayName="收缩压"
                                          codeSystemName="卫生信息数据元目录"/>
                                    <value unit="mmHg" value="${docData.shengMingTZ.shouSuoYa}" xsi:type="PQ"/>
                                </observation>
                            </component>
                            <component>
                                <observation moodCode="EVN" classCode="OBS">
                                    <code code="DE04.10.176.00" codeSystem="2.16.156.10011.2.2.1" displayName="舒张压"
                                          codeSystemName="卫生信息数据元目录"/>
                                    <value unit="mmHg" value="${docData.shengMingTZ.shuZhangYa}" xsi:type="PQ"/>
                                </observation>
                            </component>
                        </organizer>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE04.10.188.00" codeSystem="2.16.156.10011.2.2.1" displayName="体重"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="kg" value="${docData.shengMingTZ.tiZhong}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE05.10.075.00" codeSystem="2.16.156.10011.2.2.1" displayName="体质指数"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="Kg/m2" value="${docData.shengMingTZ.tiZhiZS}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE04.10.206.00" codeSystem="2.16.156.10011.2.2.1" displayName="心率"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="次/min" value="${docData.shengMingTZ.xinLv}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE04.10.143.00" codeSystem="2.16.156.10011.2.2.1" displayName="其他阳性体征"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="ST">${docData.shengMingTZ.qiTaYXTZ}</value>
                        </observation>
                    </entry>
                </section>
            </component>
            <component>
                <section>
                    <code displayName="生活方式"/>
                    <text/>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.053.00" codeSystem="2.16.156.10011.2.2.1" displayName="日吸烟量"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="支" value="${docData.shengHuoFS.riXiYL}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.054.00" codeSystem="2.16.156.10011.2.2.1" displayName=" 日饮酒量"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="两" value="${docData.shengHuoFS.riYinJL}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.087.00" codeSystem="2.16.156.10011.2.2.1" displayName="锻炼频率"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="CD" codeSystem="2.16.156.10011.2.3.1.23" codeSystemName="身体活动频率代码表"
                                   code="${docData.shengHuoFS.duanLianPL.code}"
                                   displayName="${docData.shengHuoFS.duanLianPL.displayName}"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.088.00" codeSystem="2.16.156.10011.2.2.1" displayName="每次锻炼时间"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="IVL_TS">
                                <width unit="min" value="${docData.shengHuoFS.meiCiDLSJ}"/>
                            </value>
                        </observation>
                    </entry>
                    <#if docData.shengHuoFS.sheYanQK??>
                        <entry>
                            <observation moodCode="EVN" classCode="OBS">
                                <code code="DE03.00.094.00" codeSystem="2.16.156.10011.2.2.1" displayName="摄盐情况 "
                                      codeSystemName="卫生信息数据元目录"/>
                                <value code="${docData.shengHuoFS.sheYanQK.code}" xsi:type="CD"
                                       codeSystem="2.16.156.10011.2.3.2.25"
                                       displayName="${docData.shengHuoFS.sheYanQK.displayName}"
                                       codeSystemName="摄盐量分级代码表"/>
                            </observation>
                        </entry>
                    </#if>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE05.10.083.00" codeSystem="2.16.156.10011.2.2.1" displayName="心理调整"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value code="${docData.shengHuoFS.xinLiTZ.code}" xsi:type="CD"
                                   codeSystem="2.16.156.10011.2.3.2.26"
                                   displayName="${docData.shengHuoFS.xinLiTZ.displayName}"
                                   codeSystemName="心理调整评价结果代码表"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE05.10.068.00" codeSystem="2.16.156.10011.2.2.1" displayName="遵医行为"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value code="${docData.shengHuoFS.zunYiXW.code}" xsi:type="CD"
                                   codeSystem="2.16.156.10011.2.3.2.27"
                                   displayName="${docData.shengHuoFS.zunYiXW.displayName}"
                                   codeSystemName="随访遵医行为评价结果代码表"/>
                        </observation>
                    </entry>
                </section>
            </component>
            <component>
                <section>
                    <code code="18776-5" codeSystem="2.16.840.1.113883.6.1" displayName="TREATMENT PLAN"
                          codeSystemName="LOINC"/>
                    <text/>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE04.10.188.00" codeSystem="2.16.156.10011.2.2.1" displayName="目标体重"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="KG" value="${docData.zhiLiaoJH.muBiaoTZ}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE05.10.075.00" codeSystem="2.16.156.10011.2.2.1" displayName="目标体质指数"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="kg/m2" value="${docData.zhiLiaoJH.muBiaoTZZS}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.053.00" codeSystem="2.16.156.10011.2.2.1" displayName="目标日吸烟量"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="支" value="${docData.zhiLiaoJH.muBiaoRXYL}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.054.00" codeSystem="2.16.156.10011.2.2.1" displayName=" 目标日饮酒量"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value unit="两" value="${docData.zhiLiaoJH.muBiaoRYJL}" xsi:type="PQ"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.087.00" codeSystem="2.16.156.10011.2.2.1" displayName="锻炼频率"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="CD" codeSystem="2.16.156.10011.2.3.1.23" codeSystemName="身体活动频率代码表"
                                   code="${docData.zhiLiaoJH.muBiaoDLPL.code}"
                                   displayName="${docData.zhiLiaoJH.muBiaoDLPL.displayName}"/>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.088.00" codeSystem="2.16.156.10011.2.2.1" displayName="目标运动时长"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value xsi:type="IVL_TS">
                                <width unit="min" value="${docData.zhiLiaoJH.muBiaoYDSC}"/>
                            </value>
                        </observation>
                    </entry>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE03.00.094.00" codeSystem="2.16.156.10011.2.2.1" displayName="目标摄盐情况 "
                                  codeSystemName="卫生信息数据元目录"/>
                            <value code="${docData.zhiLiaoJH.muBiaoSYQK.code}" xsi:type="CD"
                                   codeSystem="2.16.156.10011.2.3.2.25"
                                   displayName="${docData.zhiLiaoJH.muBiaoSYQK.displayName}"
                                   codeSystemName="摄盐量分级代码表"/>
                        </observation>
                    </entry>
                </section>
            </component>
            <!--实验室检查章节-->
            <component>
                <section>
                    <code code="30954-2" codeSystem="2.16.840.1.113883.6.1"
                          codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
                    <text/>
                    <#if docData.shiYanSJC??>
                        <#list docData.shiYanSJC as item>
                            <entry>
                                <organizer classCode="CLUSTER" moodCode="EVN">
                                    <statusCode/>
                                    <component>
                                        <observation classCode="OBS" moodCode="EVN">
                                            <code code="DE04.30.010.00" codeSystem="2.16.156.10011.2.2.1"
                                                  codeSystemName="卫生信息数据元目录" displayName="辅助检查项目"></code>
                                            <!--检测日期-->
                                            <effectiveTime value="${item.jianCeRQ}"></effectiveTime>
                                            <value xsi:type="ST">${item.fuZhuJCXM}</value>
                                            <performer>
                                                <assignedEntity>
                                                    <id/>
                                                    <assignedPerson>
                                                        <name>${item.fuZhuJCRYXM}</name>
                                                    </assignedPerson>
                                                </assignedEntity>
                                            </performer>
                                        </observation>
                                    </component>
                                    <component>
                                        <observation classCode="OBS" moodCode="EVN">
                                            <code code="DE04.30.009.00" codeSystem="2.16.156.10011.2.2.1"
                                                  codeSystemName="卫生信息数据元目录" displayName="辅助检查结果"></code>
                                            <value xsi:type="ST">${item.fuZhuJCJG}</value>
                                        </observation>
                                    </component>
                                </organizer>
                            </entry>
                        </#list>
                    </#if>
                </section>
            </component>
            <#if docData.yongYao??>
            <#list docData.yongYao as yongyao>
            <component>
                <section>
                    <code code="10160-0" codeSystem="2.16.840.1.113883.6.1" displayName="HISTORY OF MEDICATION USE"
                          codeSystemName="LOINC"/>
                    <text/>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE06.00.164.00" codeSystem="2.16.156.10011.2.2.1" displayName="中药类别代码"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value code="${yongyao.zhongYaoSYLB.code}" xsi:type="CD"
                                   codeSystem="2.16.156.10011.2.3.1.157"
                                   displayName="${yongyao.zhongYaoSYLB.displayName}"
                                   codeSystemName="中药使用类别代码表"/>
                        </observation>
                    </entry>
                    <#if yongyao.yongYaoItemList??>
                        <#list yongyao.yongYaoItemList as item>
                            <entry>
                                <substanceAdministration moodCode="EVN" classCode="SBADM">
                                    <text/>
                                    <routeCode code="${item.yongYaoTJ.code}" codeSystem="2.16.156.10011.2.3.1.158"
                                               displayName="${item.yongYaoTJ.displayName}" codeSystemName="用药途径代码表"/>
                                    <doseQuantity unit="${item.danCiYYJL.unit}" value="${item.danCiYYJL.value}"/>
                                    <rateQuantity unit="${item.yaoWuSYPL.unit}" value="${item.yaoWuSYPL.value}"/>
                                    <consumable>
                                        <manufacturedProduct>
                                            <manufacturedLabeledDrug>
                                                <code/>
                                                <name>${item.yaoPinMC}</name>
                                            </manufacturedLabeledDrug>
                                        </manufacturedProduct>
                                    </consumable>
                                    <entryRelationship typeCode="COMP">
                                        <observation classCode="OBS" moodCode="EVN">
                                            <code code="DE06.00.027.00" codeSystem="2.16.156.10011.2.2.1"
                                                  codeSystemName="卫生信息数据元目录" displayName="用药观察"/>
                                            <!--服药依从性-代码 1 表示规律-->
                                            <value code="${item.fuYaoYCX.code}"
                                                   displayName="${item.fuYaoYCX.displayName}"
                                                   codeSystem="2.16.156.10011.2.3.2.12"
                                                   codeSystemName="服药依从性代码表" xsi:type="CD"/>
                                        </observation>
                                    </entryRelationship>
                                    <entryRelationship typeCode="COMP">
                                        <observation moodCode="EVN" classCode="OBS">
                                            <code code="DE06.00.130.00" codeSystem="2.16.156.10011.2.2.1"
                                                  displayName="用药副作用"
                                                  codeSystemName="卫生信息数据元目录"/>
                                            <value xsi:type="ST">${item.yongYaoFZY}</value>
                                            <precondition>
                                                <criterion>
                                                    <value xsi:type="BL" value="${item.yongYaoFZYBZ}"/>
                                                </criterion>
                                            </precondition>
                                        </observation>
                                    </entryRelationship>

                                    <entryRelationship typeCode="COMP">
                                        <observation classCode="OBS" moodCode="EVN">
                                            <code code="DE06.00.135.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录" displayName="药物使用总剂量"/>
                                            <!-- 药物使用总剂量 -->
                                            <value xsi:type="PQ" unit="mg" value="9.00"/>
                                        </observation>
                                    </entryRelationship>
                                </substanceAdministration>
                            </entry>
                        </#list>
                    </#if>
                </section>
            </component>
            </#list>
            </#if>
            <component>
                <section>
                    <code code="51848-0" codeSystem="2.16.840.1.113883.6.1" displayName="Assessment note"
                          codeSystemName="LOINC"/>
                    <text/>
                    <entry>
                        <observation moodCode="EVN" classCode="OBS">
                            <code code="DE05.10.066.00" codeSystem="2.16.156.10011.2.2.1" displayName="随访评价结果"
                                  codeSystemName="卫生信息数据元目录"/>
                            <value code="${docData.jianKangPG.suiFangPJ.code}" xsi:type="CD"
                                   codeSystem="2.16.156.10011.2.3.1.150"
                                   displayName="${docData.jianKangPG.suiFangPJ.displayName}"
                                   codeSystemName="随访评价结果代码表"/>
                        </observation>
                    </entry>
                </section>
            </component>
            <component>
                <section>
                    <code code="18776-1" codeSystem="2.16.840.1.113883.6.1" displayName="referal"
                          codeSystemName="LOINC"/>
                    <text/>
                    <entry>
                        <observation classCode="OBS" moodCode="EVN">
                            <code code="DE06.00.174.00" codeSystem="2.16.156.10011.2.2.1"
                                  codeSystemName="卫生信息数据元目录" displayName="转诊标志"/>
                            <value xsi:type="BL" value="${docData.zhuanZhenJY.zhuanZhenBZ}"></value>
                            <entryRelationship typeCode="CAUS" negationInd="false">
                                <act classCode="INFRM" moodCode="APT" negationInd="false">
                                    <code code="DE06.00.177.00" codeSystem="2.16.156.10011.2.2.1"
                                          codeSystemName="卫生信息数据元目录" displayName="转诊原因"/>
                                    <text>${docData.zhuanZhenJY.zhuanZhenYY}</text>
                                    <performer>
                                        <time/>
                                        <assignedEntity>
                                            <id/>
                                            <representedOrganization>
                                                <name>${docData.zhuanZhenJY.zhuanRuKSMC}</name>
                                                <asOrganizationPartOf>
                                                    <wholeOrganization>
                                                        <name>${docData.zhuanZhenJY.zhuanRuJGMC}</name>
                                                    </wholeOrganization>
                                                </asOrganizationPartOf>
                                            </representedOrganization>
                                        </assignedEntity>
                                    </performer>
                                </act>
                            </entryRelationship>
                        </observation>
                    </entry>
                </section>
            </component>
            <component>
                <section>
                    <code displayName="下次随访日期"/>
                    <text/>
                    <entry>
                        <observation classCode="OBS" moodCode="DEF">
                            <code code="DE06.00.109.00" codeSystem="2.16.156.10011.2.2.1" codeSystemName="卫生信息数据元目录"
                                  displayName="下次随访日期"/>
                            <value xsi:type="TS" value="${docData.xiaCiSFAP.xiaCiSFRQ}"/>
                        </observation>
                    </entry>
                </section>
            </component>
        </structuredBody>
    </component>
</ClinicalDocument>